package com.yjd.comm.easycard.model;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotEmpty;

import com.yjd.comm.base.model.Model;
import com.yjd.comm.util.DateUtil;

/**
 * <b>description</b>：易借卡电调记录表模型<br>
 * <b>time</b>：2015-04-11 00:55:02 <br>
 * <b>author</b>：  Song devpage@126.com
 */
public class EasycardCallbackModel extends Model {

	/**
	* @Fields serialVersionUID
	*/
	private static final long serialVersionUID = 1L;
	
	private Long id;
	
	private Long easycard_basedata_id;
	@NotEmpty(message="联系电话不能为空")
	@Length(max=11,message="联系电话不能太长")
	private String callback_phone;
	@NotEmpty(message="电调时间不能为空")
	private String callback_datetime_str;
	@NotEmpty(message="电调备注不能为空")
	private String callback_comments;
	@Max(1)
	@Min(0)
	@NotNull(message="请选择是否完成电调")
	private Integer isok;
	private Integer admin_id;
	private String admin_name;

	private Long callback_datetime;
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public Long getEasycard_basedata_id() {
		return easycard_basedata_id;
	}
	public void setEasycard_basedata_id(Long easycard_basedata_id) {
		this.easycard_basedata_id = easycard_basedata_id;
	}
	public String getCallback_phone() {
		return callback_phone;
	}
	public void setCallback_phone(String callback_phone) {
		this.callback_phone = callback_phone;
	}
	public String getCallback_datetime_str() {
		if(getCallback_datetime()!=null){	
			return DateUtil.format(DateUtil.timestampToDate(getCallback_datetime()),DateUtil.PATTERN_yyyy_MM_dd);
		}
		return callback_datetime_str;
	}
	public void setCallback_datetime_str(String callback_datetime_str) {
		this.callback_datetime_str = callback_datetime_str;
	}
	public Long getCallback_datetime() {
		return callback_datetime;
	}
	public void setCallback_datetime(Long callback_datetime) {
		this.callback_datetime = callback_datetime;
	}
	public String getCallback_comments() {
		return callback_comments;
	}
	public void setCallback_comments(String callback_comments) {
		this.callback_comments = callback_comments;
	}
	public Integer getIsok() {
		return isok;
	}
	public void setIsok(Integer isok) {
		this.isok = isok;
	}
	public Integer getAdmin_id() {
		return admin_id;
	}
	public void setAdmin_id(Integer admin_id) {
		this.admin_id = admin_id;
	}
	public String getAdmin_name() {
		return admin_name;
	}
	public void setAdmin_name(String admin_name) {
		this.admin_name = admin_name;
	}

	 

}
